﻿using Inovout.Business;
using Inovout.SoftwareStudio.Models;
using Inovout.Services;
using System.Collections.Generic;

namespace Inovout.SoftwareStudio.Business
{
    public class ListProductWorkItem : BaseWorkItem
    {
        private IRepositoryService<Product> productService;
        public ListProductWorkItem(IRepositoryService<Product> productService)
        {
            this.productService = productService;
            //this.Functions.Add(SoftwareStudioFunctionGroup.Instance.NewProduct);
        }
        protected override void Run()
        {
            IList<Product> list = productService.FindAll();
            list.Add(new Product { Name = "Product1" });
            base.View(list);
        }
       
    }
}
